Column

Chart A

rest_inspec %>%
  filter(boro == "Manhattan") %>% 
plot_ly(x = ~inspection_date, y = ~score, color = ~grade, type = "scatter", mode = "markers", colors = "viridis") %>% 
  add_trace(opacity = 0.5, showlegend = F) %>% 
  layout(title = "Manhattan Scores over Time")

Column

Chart B

rest_inspec %>% 
  group_by(boro, grade) %>% 
  summarize(n = n()) %>% 
  plot_ly(x = ~grade, y = ~n, color = ~boro, colors = "viridis") %>% 
  layout(title="Count of Grades in Boroughs")
## `summarise()` regrouping output by 'boro' (override with `.groups` argument)
## No trace type specified:
##   Based on info supplied, a 'bar' trace seems appropriate.
##   Read more about this trace type -> https://plot.ly/r/reference/#bar

Chart C

rest_inspec %>% 
  filter(boro != "Missing") %>% 
  mutate(boro = str_to_title(boro)) %>% 
  plot_ly(x = ~boro, y = ~score, type = "box", color = ~boro, colors = "viridis") %>% 
  layout(title = "Score Distribution per Borough")